.clear:after,
.clear:before {
  display: table;
  content: ""
}

.clear:after {
  clear: both
}

.right {
  float: right;
}

.left {
  float: left;
}

.flex {
  display: flex;

  &1 {
    flex: 1;
  }
}

.gray {
  color: $primary-light;
}

.link {
  color: #fff;
  font-weight: 600;
  margin-right: 6px;

  @at-root a.link:hover {
    text-decoration: none;
    color: $secondary-light;
  }
}

.none {
  display: none;
}

.avatar {
  height: 44px;
  width: 44px;
  border-radius: 3px;
  margin-right: 16px;

  &--small {
    height: 32px;
    width: 32px;
  }

  &--big {
    height: 260px;
    width: 260px;
    border-radius: 6px;
  }
}

.module {
  background-color: rgba($primary, 0.68);
  border: 1px solid $primary-light;
  border-radius: 6px;
  overflow: hidden;

  &__header {
    line-height: 44px;
    padding: 0 15px;
    background-color: $primary;
    border-bottom: 1px solid $primary-light;
  }

  &__body {
    padding: 15px;
  }
}

.button {
  background-color: $secondary;
  color: #fff;
  will-change: box-shadow;
  height: 36px;
  padding: 0 16px;
  border: none;
  border-radius: 2px;
  outline: none;
  font-size: 14px;
  font-weight: 500;
  line-height: 36px;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  overflow: hidden;
  user-select: none;
  box-sizing: border-box;
  transition: $transition;

  &--space {
    margin-bottom: 16px;
  }

  &:hover {
    background-color: $secondary-light;
  }

  &:active {
    background-color: $secondary-dark;
  }
}

.label {
  color: $primary-light;
  margin-bottom: 3px;
  display: block;
}

.tip {
  margin-right: 16px;
  float: right;
  color: $secondary-light;
  line-height: 36px;
}

.input {
  box-sizing: border-box;
  width: 100%;
  border: 1px solid $primary-light;
  border-radius: 3px;
  box-shadow: inset 0 1px 2px rgba(27, 31, 35, .075);
  color: #fff;
  font-size: 16px;
  line-height: 20px;
  padding: 6px 8px;
  background-color: $primary;
  transition: $transition;

  &--space {
    margin-bottom: 16px;
  }

  &:hover {
    border-color: $secondary-light;
  }

  &:focus {
    border-color: $secondary;
  }

  &[readonly] {
    color: $primary-light;
  }
}


@keyframes bounceInDown {
  from {
    transform: translate3d(0, -100%, 0);
  }
  to {
    transform: translate3d(0, 0, 0);
  }
}

#msg {
  z-index: 100;
  animation-duration: .6s;
  animation-fill-mode: both;
  animation-name: bounceInDown;
  background-color: $primary-light;
  color: #fff;
  position: fixed;
  top: 0;
  left: 50%;
  width: 360px;
  margin-left: -180px;
  box-sizing: border-box;
  padding: 16px;
  line-height: 24px;
  border-radius: 0 0 6px 6px;
}

.wrap {
  width: 760px;
  margin: 0 auto 50px;

  &--small {
    width: 384px;
  }
}

@keyframes rotation {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.header {
  background-color: $primary;
  color: hsla(0, 0%, 100%, .7);
  font-size: 14px;
  line-height: 24px;
  padding: 16px;
  margin-bottom: 50px;
  text-align: center;

  #logo img {
    height: 24px;
    width: 24px;
    margin-right: 8px;
    &.rotation {
      animation: rotation 1.5s linear infinite;
    }
  }

  &__item {
    color: #fff;
    font-weight: 600;
    white-space: nowrap;
    margin-right: 16px;

    &:hover {
      color: hsla(0, 0%, 100%, .7);
      text-decoration: none;
    }

    &--current {
      color: $secondary;
    }
  }
}

.post {
  &__item {
    display: flex;
    padding: 16px 0;
    border-top: 1px solid $primary-light;

    &:first-child {
      border-top: 0;
    }
  }

  &__title {
    border: 1px solid $primary-light;
    border-radius: 3px;
    font-size: 16px;
    color: #fff;
    padding: 16px;
    margin-top: 16px;
    display: block;
    background-color: $primary;
    font-weight: 600;

    &:hover {
      text-decoration: none;
      color: $secondary;
      border-color: $secondary-light;
    }
  }
}


.comment {
  &__item {
    display: flex;
    margin-bottom: 15px;
    position: relative;

    &:after {
      content: '';
      position: absolute;
      background-color: $primary-light;
      width: 2px;
      height: 15px;
      bottom: -15px;
      left: 80px;
    }

    &--add {
      padding-top: 15px;
      border-top: 2px solid $primary-light;

      &:after {
        display: none;
      }
    }
  }
}